﻿using System.Threading.Tasks;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using SuperSocket;
using SuperSocketV2Sample.PipelineFilter.Server;

namespace SuperSocketV2Sample.PipelineFilter
{
    class Program
    {
        static async Task Main()
        {
            //创建宿主：用Package的类型和PipelineFilter的类型创建SuperSocket宿主。
            var host = SuperSocketHostBuilder.Create<MyPackage, MyPipelineFilter>()
                //配置日志
                .ConfigureLogging((hostCtx, loggingBuilder) =>
                {
                    loggingBuilder.AddConsole();
                })
                .Build();
            await host.RunAsync();
        }
    }
}
